package com.pth.service.impl;

import java.util.List;

import com.pth.dao.CommentDAO;
import com.pth.model.Comment;
import com.pth.model.Huati;
import com.pth.service.CommentService;

public class CommentServiceImpl implements CommentService {

	private CommentDAO commentDAO;
	
	public void add(Comment comment) {

		commentDAO.save(comment);
	}

	public void delete(Comment comment) {

		commentDAO.delete(comment);
		
	}

	public void modify(Comment comment) {

		commentDAO.update(comment);
		
	}

	public Comment getModifyByid(int id) {

		return commentDAO.getCommentByid(id);
	}

	public List<Comment> getCommentsByHuati(Huati huati) {

		return commentDAO.getCommentsByHuati(huati);
	}

	public CommentDAO getCommentDAO() {
		return commentDAO;
	}

	public void setCommentDAO(CommentDAO commentDAO) {
		this.commentDAO = commentDAO;
	}

}
